package com.njtoyo.taxi.admin.mapper.master.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njtoyo.taxi.admin.library.Const;
import com.njtoyo.taxi.admin.mapper.master.entity.Recharge;
import com.njtoyo.taxi.admin.rest.presenter.data.allowance.CustomerTotalPresenter;
import com.njtoyo.taxi.admin.rest.presenter.finance.vo.FinanceAllowanceStatsAmountVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author Dell
 * @since 2021-07-29
 */
@Repository
@DS(Const.PRIMARY_DS)
public interface RechargeMapper extends BaseMapper<Recharge> {

    CustomerTotalPresenter selectAllowanceForAdd(@Param("startTime") String startTime, @Param("endTime") String endTime);

    CustomerTotalPresenter selectAllowanceForReduct(@Param("startTime") String startTime, @Param("endTime") String endTime);

    List<FinanceAllowanceStatsAmountVo> selectCustomerAppRideReward(@Param("startDate") Date startDate, @Param("endDate") Date endDate);

}
